{{if .Comment}}
<div id="comment">
    {{if .Comment.Disqus}}
    <div id="disqus_thread"></div>
    <script>
        (function () {
            var d = document, s = d.createElement('script');
            s.src = '//{{.Comment.Disqus}}.disqus.com/embed.js';
            s.setAttribute('data-timestamp', +new Date());
            (d.head || d.body).appendChild(s);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
        Disqus.</a></noscript>
    <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
    {{end}}
    {{if .Comment.Duoshuo}}
    <div class="row">
        <div class="ds-thread" data-thread-key="{{.PermaKey}}" data-title="{{.Title}}" data-url="{{.Root}}{{.URL}}"></div>
        <script type="text/javascript">
            var duoshuoQuery = {short_name:"{{.Comment.Duoshuo}}"};
            (function() {
                var ds = document.createElement('script');
                ds.type = 'text/javascript';ds.async = true;
                ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
                ds.charset = 'UTF-8';
                (document.getElementsByTagName('head')[0]
                || document.getElementsByTagName('body')[0]).appendChild(ds);
            })();
        </script>
    </div>{{end}}
</div>
{{end}}